package dto

import "time"

// CityResponse 城市响应DTO
type CityResponse struct {
	ID           uint      `json:"id"`
	Name         string    `json:"name"`
	Code         string    `json:"code"`
	ProvinceID   uint      `json:"province_id"`
	ProvinceName string    `json:"province_name"`
	Status       int       `json:"status"`
	Sort         int       `json:"sort"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

// CityListRequest 城市列表请求DTO
type CityListRequest struct {
	Page         int    `form:"page" json:"page" binding:"min=1"`
	PageSize     int    `form:"page_size" json:"page_size" binding:"min=1,max=100"`
	Name         string `form:"name" json:"name"`
	ProvinceName string `form:"province_name" json:"province_name"`
	Status       *int   `form:"status" json:"status"`
	SortBy       string `form:"sort_by" json:"sort_by"`
	Order        string `form:"order" json:"order"`
}

// CityCreateRequest 创建城市请求DTO
type CityCreateRequest struct {
	Name         string `json:"name" binding:"required,max=100"`
	Code         string `json:"code" binding:"max=50"`
	ProvinceID   uint   `json:"province_id"`
	ProvinceName string `json:"province_name" binding:"max=100"`
	Status       int    `json:"status" binding:"min=0,max=1"`
	Sort         int    `json:"sort"`
}

// CityUpdateRequest 更新城市请求DTO
type CityUpdateRequest struct {
	Name         string `json:"name" binding:"max=100"`
	Code         string `json:"code" binding:"max=50"`
	ProvinceID   uint   `json:"province_id"`
	ProvinceName string `json:"province_name" binding:"max=100"`
	Status       int    `json:"status" binding:"min=0,max=1"`
	Sort         int    `json:"sort"`
}

// CityBatchDeleteRequest 批量删除城市请求DTO
type CityBatchDeleteRequest struct {
	IDs []uint `json:"ids" binding:"required,min=1"`
}